/*
    "total": 3,
    "items": [
      {
        "id": "1585809581943758849",
        "gmtCreate": "2022-10-28 09:44:02",
        "gmtModified": "2022-10-28 09:44:02",
        "deleted": false,
        "username": "胖颖飞刀",
        "password": "e10adc3949ba59abbe56e057f20f883e",
        "nickName": "小赵粉丝````````````````",
        "salt": null,
        "token": null,
        "roleName": ""
      }
*/
export interface UserItem {
  id: string;
  gmtCreate: string;
  gmtModified: string;
  username: string;
  nickName: string;
  roleName: string;
}
export type UserList = UserItem[];

export interface GetUserResponse {
  total: number;
  items: UserList;
}

// 新增
/*
{
  "deleted": false,
  "gmtCreate": "2022-10-28T01:55:31.551Z",
  "gmtModified": "2022-10-28T01:55:31.551Z",
  "id": "string",
  "nickName": "string",
  "password": "string",
  "roleName": "string",
  "salt": "string",
  "token": "string",
  "username": "string"
}
*/
export interface GetSaveUserParams
  extends Pick<UserItem, "username" | "nickName"> {
  password: string;
}
/*
[
      {
        "id": "1",
        "gmtCreate": "2022-01-01 00:00:00",
        "gmtModified": "2022-01-01 00:00:00",
        "deleted": false,
        "roleName": "平台管理员",
        "remark": null
      },
*/
export interface RoleItem {
  id: string;
  roleName: string;
  gmtCreate: string;
  gmtModified: string;
}
export type RoleList = RoleItem[];
export interface GetUserListResponse {
  assignRoles: RoleList;
  allRolesList: RoleList;
}
